package com.jia.train.seat.feign;

import com.jia.train.global.response.BaseResponse;
import com.jia.train.seat.feign.fallback.TrainMemberFeignFallback;
import com.jia.train.seat.feign.pojo.TicketSaveRequest;
import com.jia.train.seat.feign.pojo.TicketSaveResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

//@FeignClient(name = "train-member", url = "http://localhost:8081", path = "/member/ticket")
@FeignClient(name = "train-member", path = "/member/ticket", fallback = TrainMemberFeignFallback.class)
public interface TrainMemberFeignClient {

    @PostMapping("/batch/insert")
    public BaseResponse<List<TicketSaveResponse>> createTicket(@RequestBody List<TicketSaveRequest> list);

}
